** All these procedures must be declared as void far Proc(void).
* Paint procedure - is necessary for Virtual Panels
core to repaint the PERM
Object on the screen when it is necessary (usually after dragging the
Object). You have to supply such a procedure for every PERM Object.
The FIXED and POPUP Objects don't need such procedure.
* Button procedure - is the procedure attached to the button. It is
called at the every instance of pushing the corresponding button.
* Menu procedure - is similar to button procedure but is called when
the corresponding menu item is chosen.
We use the next prefix notation: pp - for paint procedure, bp - for
button procedure and mp - for menu procedure.
Example 2.6.1:
void far ppFourier(void) // Paint procedure for PERM Graph grFourier { grFourier->Paint(); // paint Graph object grFourier->ShowCurve( NumPoints, XReal);// then output array on it } void far bpFourier(void) { ppFourier(); // paint grFourier over other objects on the screen grFourier->MkActive();// make grFourier available for dragging or // removing RealFFT(....) // perform FFT grFourier->ShowCurve( NumPoints, XReal, WHITE); // now demonstrate grFourier->ShowCurve( NumPoints, XImag, RED); // Fourier spectrum }
As you see paint, button and menu procedures use pointers to classes, because classes usually are declared in main() or other button procedures.